package com.ozo.boot.gen.service;

import com.ozo.boot.gen.pojo.dto.GenTableDetailDTO;
import freemarker.template.TemplateException;
import jakarta.servlet.http.HttpServletResponse;

import java.io.IOException;

/**
 * <p>
 * 代码生成服务
 * </p>
 *
 * @author qiangesoft
 * @date 2024-11-16
 */
public interface CodeGeneratorService {

    /**
     * 本地代码生成
     *
     * @param detailDTO
     * @throws IOException
     * @throws TemplateException
     */
    void generateLocal(GenTableDetailDTO detailDTO) throws IOException, TemplateException;

    /**
     * 下载代码生成
     *
     * @param detailDTO
     * @param response
     * @throws IOException
     * @throws TemplateException
     */
    void generateDownload(GenTableDetailDTO detailDTO, HttpServletResponse response) throws IOException, TemplateException;

}
